import linenum from "@js/markdown/linenum.js";
var Markdown = window.markdownit({
  html: true,
  linkify: true,
  typographer: true,
  highlight: function(str, lang) {
    if (lang && window.hljs.getLanguage(lang)) {
      return (
        '<pre class="hljs"><code>' +
        window.hljs.highlight(lang, str, true).value +
        "</code></pre>"
      );
    }

    return (
      '<pre class="hljs"><code>' + str + "</code></pre>"
      //'<pre class="hljs"><code>' + md.utils.escapeHtml(str) + "</code></pre>"
    );
  }
})
  .use(require("markdown-it-sup"))
  .use(require("markdown-it-sub"))
  .use(require("markdown-it-mark"))
  .use(require("markdown-it-ins"))
  .use(require("markdown-it-attrs"))
  .use(linenum);

export default Markdown;